/*
 * @Descripttion: 
 * @version: 
 * @Author: cyj
 * @Date: 2022-12-09 21:07:41
 */
//格式化数字插件
function formatNum(num) {
    if (num > 100000000) {
        num = (num / 100000000).toFixed(2)
        return num + '亿'
    } else if (num > 10000) {
        num = (num / 10000).toFixed(2)
        return num + '万'
    } else return num
}

export default {
    install(app) {
        app.config.globalProperties.$formatNums = {
            formatNum
        }
    }
}